Add Date, Page Number, and Page Count

To add a date, page number, and page count to your banded report:

  1. From within the Editor, click the “Add a System Data Field” icon Add system data icon on the toolbar, then click anywhere within the Page Header band to place the object. Placing the object will open the Edit System Data Field dialog.
    Edit System Data Field dialog with the Date type selected.
  2. There are a number of Date/Time selections, but select Date for this example.  You need not enter anything into the Text field for this example. 
    This image shows the date field added to the page header band.
  3. Note the addition of the date field in the Page Header band.  Drag the field to the upper right corner of the band.
  4. Next the string ‘Page x of y’ will be created and placed underneath the date within the Page Header band.   Within the Band Report Editor, click the E=mc2 The add expression field icon. icon, then click anywhere within the Page Header band. 
  5. Click the ellipsis button ellipses button to the right of the Expression field.
    Edit Expression field dialog.  This dialog contains fields where you can create an expression, specify rotation, font, color, alignment, and other formatting options.
  6. Enter the first segment of the expression which consists of the string ‘Page No. ‘ and the + operator: The + operator concatenates strings and eliminates leading/trailing spaces.
    Expression Wizard dialog with Page Number entered into the text field within single quotes.
  7. Click the Function button to display the list of available functions. Select PAGENUMBER from the list.
    Expression Wizard dialog with the page number function selected.
  8. Click Continue to launch the Expression Wizard.
    Expression Wizard dialog. The dialog now reads page number plus the page number function plus of. Of is within single quotes as is page number at the beginning of the expression. These are labels.
  9. Click the Function button again to display the list of functions again. Select PAGECOUNT from the list.
    Expression wizard with the page count function selected.
  10. Click Continue to return to the Expression Wizard.
    Expression Wizard dialog with page count added at the end of the expression. The expression now reads page number in single quotes plus the page number function plus 'of' within single quotes plus the page count function.
  11. Check your completed expression and click OK to return to the Edit Expression Field dialog.
    The completed expression within the Edit Expression Field dialog box.
  12. Check the "Autosize width" and "Print" checkboxes and click OK.

The new field is now positioned within the Page Header Band.  If it is not positioned in the desired location, drag the field until it is underneath the date.